*Paper: Fiscal Rules, Corruption and Electoral Accountability - Replication Files

clear all
cap log close 
set more off


**Global files
global folder "/Users/tommasogiommoni/Dropbox/Determinants of corruption/Stability pact and corruption/Replication files JOP"


********************************************************************************
****----						Dataset open 					    	----**** 
********************************************************************************

use "$folder/Data/dataset_feb2024.dta", clear

**-- Global

global controls7 proportion_female_Elected_lag av_education_Elected_lag av_age_Elected_lag  victory_margin_lag term_limit_lag 
global controls7_int  c.proportion_female_Elected_lag##i.anno c.av_education_Elected_lag##i.anno c.av_age_Elected_lag##i.anno c.victory_margin_lag##i.anno  c.term_limit_lag##i.anno

**-- Panel dataset

xtset codcom anno
fvset base 2012 anno

********************************************************************************
****----						Analysis 					    		----**** 
********************************************************************************


qui reghdfe house_tax_ordinary S##T P i.region_year population_anagrafe_V##post_2012 $controls7_int if abs(P)<2500 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab1_0
qui reghdfe current_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab1_2
qui reghdfe capital_ext_PC S##T P i.region_year $controls7_int if abs(P)<2500 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab1_3
qui reghdfe procurement_amount_PC S##T P i.region_year $controls7_int if abs(P)<2500 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab1_4
qui reghdfe current_cappital_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab1_5

qui reghdfe house_tax_ordinary S##T P i.region_year population_anagrafe_V##post_2012 $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab2_0
qui reghdfe current_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab2_2
qui reghdfe capital_ext_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab2_3
qui reghdfe procurement_amount_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab2_4
qui reghdfe current_cappital_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab2_5

qui reghdfe house_tax_ordinary S##T P i.region_year population_anagrafe_V##post_2012 $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab3_0
qui reghdfe current_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab3_2
qui reghdfe capital_ext_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab3_3
qui reghdfe procurement_amount_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab3_4
qui reghdfe current_cappital_exp_PC S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab3_5

esttab tab2_0 tab2_2 tab2_3 tab2_4 tab2_5, compress keep(1.S#1.T ) label nobaselevels se ar2  staraux star(* 0.10 ** 0.05 *** 0.01) replace
esttab tab2_0 tab2_2 tab2_3 tab2_4 tab2_5 using "$folder/Tables/Table2_a.tex", compress keep(1.S#1.T ) se r2 staraux collabels(, none) ml(,none) cells(b(star fmt (%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) replace

esttab tab3_0 tab3_2 tab3_3 tab3_4 tab3_5, compress keep(1.S#1.T ) label nobaselevels se ar2  staraux star(* 0.10 ** 0.05 *** 0.01) replace
esttab tab3_0 tab3_2 tab3_3 tab3_4 tab3_5 using "$folder/Tables/Table2_b.tex", compress keep(1.S#1.T ) se r2 staraux collabels(, none) ml(,none) cells(b(star fmt (%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) replace

esttab tab1_0 tab1_2 tab1_3 tab1_4 tab1_5, compress keep(1.S#1.T ) label nobaselevels se ar2  staraux star(* 0.10 ** 0.05 *** 0.01) replace
esttab tab1_0 tab1_2 tab1_3 tab1_4 tab1_5 using "$folder/Tables/Table2_c.tex", compress keep(1.S#1.T ) se r2 staraux collabels(, none) ml(,none) cells(b(star fmt (%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) replace

